<?php
defined('ROOTPATH') OR exit('Forbidden');

class con_sign {

    public function in() {
        if (input::post('username')) {
            $username = input::post('username');
            $password = input::post('password');

            $user_info = mod_user::getUser($username);
            $check_password = $user_info['password'];
            if ($password == $check_password) {
                echo '登录成功！';
                die();
            } else {
                echo '登录失败！';
                die();
            }
        }

        view::display('sign/in');
    }
}
